< previous page page_196 next page >

Page 196
Q What is business rule logic?
A Business rule logic encompasses any preconditions and postconditions that are specific to a given business.
Workshop
The workshop includes quiz questions to help gauge your grasp of the material. You'll find the answers to this quiz in Appendix A, Answers. Even if you feel that you totally understand the concepts presented here, you should work through the quiz anyway. The last section includes exercises for you to work through to help reinforce your learning.
Quiz
1. What testing activities should you, as an object-oriented Visual Basic developer, know?
2. What's the importance of code inspections?
3. What two method responsibilities are examples, respectively, of precondition and postcondition processing?
4. When is it necessary to check the data type of an argument?
5. Why is the development of business applications complex?
6. What features in Microsoft Visual SourceSafe support parallel iterative development?
Exercises
1. In SourceSafe, create a project under the Samsona Bank Teller System project for the following:
9f8044bafea36a1f728739c0bb58ef4c.gif
Bank Transaction Policy
9f8044bafea36a1f728739c0bb58ef4c.gif
Bank Personnel Policy
9f8044bafea36a1f728739c0bb58ef4c.gif
Bank Regulation Policy
2. Review the following code from the TestClass class:
9f8044bafea36a1f728739c0bb58ef4c.gif
Public Sub testMethod(ByVal argString As String)
    MsgBox argString
End Sub
9f8044bafea36a1f728739c0bb58ef4c.gif
Modify the testMethod code so that the method does not accept argString parameters whose first character is alphabetic.
3. Using the testMethod code in exercise 2, convert the method into a function that returns a boolean value of True upon successfully fulfilling its responsibility.

 
< previous page page_196 next page >

If you like this book, buy it!